package com.football.springboot.service.impl;

import com.football.springboot.entity.Game;
import com.football.springboot.entity.GameData;
import com.football.springboot.entity.League;
import com.football.springboot.entity.Team;
import com.football.springboot.mapper.GameMapper;
import com.football.springboot.service.IGameService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 李越
 * @since 2023-02-22
 */
@Service
public class GameServiceImpl extends ServiceImpl<GameMapper, Game> implements IGameService {
    @Resource
    GameMapper gameMapper;

    @Override
    public League getLeagueinfo(int id) {
        return gameMapper.getLeagueinfo(id);
    }

    @Override
    public List<Integer> getGamebyhometeam(int hometeam) {
        return gameMapper.getGamebyhometeam(hometeam);
    }

    @Override
    public List<Integer> getGamebyawayteam(int awayteam) {
        return gameMapper.getGamebyawayteam(awayteam);
    }

    @Override
    public GameData getGameData(int gameId) {
        return gameMapper.getGameData(gameId);
    }

    @Override
    public List<Team> getTeamByGameId(Integer gameId) {
        return gameMapper.getTeamByGameId(gameId);
    }


}
